<!DOCTYPE html>

<head>

	<meta charset="utf-8" />
	<meta http-equiv ="proma" content = "no-cache"/>  
	<meta http-equiv="cache-control" content="no cache" />

	<link rel="stylesheet" type="text/css" href="universe_META/style.css" />
	<link rel="stylesheet" type="text/css" href="universe_META/popup.css" />
	<link rel='shortcut icon' type='image/x-icon' href='universe_META/icon.png'>

	<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">

	<script src="universe_META/js/utils/undefined.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12"></script>
	<script src="universe_META/js/technical/break_eternity.js"></script>
	<script src="universe_META/js/technical/layerSupport.js"></script>
	<script src="universe_META/js/tree.js"></script>
	<script src="universe_META/js/someUsefulFunctions_QwQe308.js"></script>

	<script src="universe_META/js/mod.js"></script>
	<script src="universe_META/js/utils/save.js"></script>
	<script src="universe_META/js/layers/u.js"></script>

	<script src="universe_META/js/technical/temp.js"></script>
	<script src="universe_META/js/technical/displays.js"></script>

	<script src="universe_META/js/utils/options.js"></script>
	<script src="universe_META/js/game.js"></script>
	<script src="universe_META/js/utils.js"></script>
	<script src="universe_META/js/utils/easyAccess.js"></script>
	<script src="universe_META/js/technical/systemComponents.js"></script>
	<script src="universe_META/js/components.js"></script>
	<script src="universe_META/js/technical/canvas.js"></script>
	<script src="universe_META/js/technical/particleSystem.js"></script>
	<script src="universe_META/js/utils/NumberFormating.js"></script>
	<script src="universe_META/js/utils/themes.js"></script>	
</head>


<body onload="load();if(options.ch === undefined) options.ch = window.confirm('选择语言(英文版可能会有一些bug)\nChoose your language(there may be some bugs in English mode)\n选择是:中文  否:英文\nselect yes:Chinese  no:English')" onmousemove="updateMouse(event)">
	<div id="app">
		<canvas id="treeCanvas" class="canvas" v-if="!(gameEnded && !player.keepGoing)"></canvas>

		<div v-if="false" id="loadingSection" class="fullWidth">
			<h1>加载中... (如果卡死了就是有bug!)如果你点了硬重置,请点重新游玩.<br>Loading... (If it's stuck,maybe it's a bug!)If you did hard reset before this reloading,click "play again".</h1>
		</div>
		<div class="vl" v-if="player.navTab !== 'none' && tmp.other.splitScreen && player.tab!='none' && !(gameEnded && !player.keepGoing)"></div>
		<div v-if="(gameEnded && !player.keepGoing)" class="fullWidth">
			<br>
			<h2>{{modInfo.name}} {{VERSION.withoutName}}</h2><br><br>
			<h3 v-html="modInfo.winText"></h3><br>
			<h3>看QQ来催更!</h3><br><br>
			<div v-if="!player.timePlayedReset">{{options.ch?"通关花了您":"It costs you"}} {{formatTime(player.timePlayed)}} {{options.ch?"的时间(当前版本)":"to complete this game(in current version)"}}.</div>
			<br>
			<button class="longUpg can" onclick="hardReset(true)">重新游玩-Play Again</button>&nbsp;&nbsp;&nbsp;&nbsp;<button
				class="longUpg can" onclick="keepGoing()">继续游玩-Continue Playing</button>
			<br><br><br>
			<span v-if="modInfo.discordLink"><a class="link" v-bind:href="modInfo.discordLink"
					target="_blank">{{modInfo.discordName}}</a><br></span>
			<a class="link" href="https://discord.gg/F3xveHV" target="_blank"
				v-bind:style="modInfo.discordLink ? {'font-size': '16px'} : {}">模组树Discord - The Modding Tree Discord</a><br>
			<a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">Main
				转生树Discord - The Prestige Tree Discord</a><br>
			<br><br>
		</div>

		<div id="treeOverlay" v-if="!(gameEnded && !player.keepGoing) && (player.tab === 'none' || tmp.other.splitScreen || !readData(layoutInfo.showTree))" class="treeOverlay" onscroll="resizeCanvas()"
			v-bind:class="{ 
			fullWidth: (player.tab == 'none' || player.navTab == 'none'), 
			col: (player.tab !== 'none' && player.navTab !== 'none'), 
			left: (player.tab !== 'none' && player.navTab !== 'none')}"
			 :style="{'margin-top': !readData(layoutInfo.showTree) && player.tab == 'info-tab' ? '50px' : ''}">
			<div id="version" onclick="showTab('changelog-tab')" class="overlayThing" style="margin-right: 13px" >
				{{VERSION.withoutName}}</div>
			<img id="optionWheel" class="overlayThing" v-if="player.tab!='options-tab'" src="universe_META/options_wheel.png"
				onclick="showTab('options-tab')"></img>
			<div id="info" v-if="player.tab!='info-tab'" class="overlayThing" onclick="showTab('info-tab')"><br>i</div>
			<div id="discord" class="overlayThing">
				<img onclick="window.open((modInfo.discordLink ? modInfo.discordLink : 'https://discord.gg/F3xveHV'),'mywindow')"
					src="universe_META/discord.png" target="_blank"></img>
				<ul id="discord-links">
					<li v-if="modInfo.discordLink"><a class="link" v-bind:href="modInfo.discordLink"
							target="_blank">{{modInfo.discordName}}</a><br></li>
					<li><a class="link" href="https://discord.gg/F3xveHV" target="_blank"
							v-bind:style="modInfo.discordLink ? {'font-size': '16px'} : {}">模组树Discord - The Modding Tree Discord</a><br></li>
					<li><a class="link" href="http://discord.gg/wwQfgPa" target="_blank"
							v-bind:style="{'font-size': '16px'}">转生树Discord - The Prestige Tree Discord</a></li>
				</ul>

			</div>
			<overlay-head v-if="!(gameEnded && !player.keepGoing)"></overlay-head>
			<div class="sideLayers">
				<div v-for="(node, index) in OTHER_LAYERS['side']">
					<tree-node :layer='node' :abb='tmp[node].symbol' :size="'small'" :key="'side' + index"></tree-node>
				</div>
			</div>
		</div>
		
		<div v-if="!(gameEnded && !player.keepGoing) && (player.tab === 'none' || tmp.other.splitScreen)" id="treeTab"  onscroll="resizeCanvas()" 
			v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none')}">
			<br><br><br><br>
			<overlay-head id="fakeHead" style="visibility: hidden;">
			</overlay-head>
			<layer-tab :layer="player.navTab == 'none' ? player.tab : player.navTab" :key="'left'"></layer-tab>
			<bg :layer="player.navTab == 'none' ? player.tab : player.navTab" ></bg>
		</div>

		<!-- Popups -->
		<div class="popup-container">
			<transition-group name="fade">
				<div v-for="popup,index in activePopups" class="popup" v-bind:class="popup.type"
					v-bind:key="'p' + popup.id" v-on:click="() => {activePopups.splice(index, 1)}" v-bind:style="popup.color ? {'background-color': popup.color} : {}">
					<h3>{{popup.title}}</h3><br>
					<h2 v-html="popup.message"></h2>
				</div>
			</transition-group>
		</div>
		<div class="particle-container">
				<div v-for="particle,index in particles">
					<particle :data="particle" :index="index" v-bind:key="'b' + particle.id"></particle>
				</div>
		</div>

		<div v-if="player.navTab !== 'none' && player.tab !== 'none' && !(gameEnded && !player.keepGoing)" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: player.navTab == 'none' || !tmp.other.splitScreen || !readData(layoutInfo.showTree), col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}">
			<div v-for="layer in LAYERS">
				<div v-if="player.tab==layer">
					<layer-tab :layer="layer" :back="'none'" :spacing="'50px'" :key="'left'"></layer-tab>
				</div>
			</div>
			<bg :layer="player.tab" ></bg>

		</div>
	</div>
</body>